﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TXTD.Admin.Data.Migrations
{
    public partial class _202207091 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "Enabled",
                table: "SYS_MENU",
                newName: "ENABLED");

            migrationBuilder.RenameColumn(
                name: "ParentMenuId",
                table: "SYS_MENU",
                newName: "PARENT_MENU_ID");

            migrationBuilder.RenameColumn(
                name: "OpenWay",
                table: "SYS_MENU",
                newName: "OPEN_WAY");

            migrationBuilder.RenameColumn(
                name: "MenuType",
                table: "SYS_MENU",
                newName: "MENU_TYPE");

            migrationBuilder.RenameColumn(
                name: "MenuTitle",
                table: "SYS_MENU",
                newName: "MENU_TITLE");

            migrationBuilder.RenameColumn(
                name: "MenuSort",
                table: "SYS_MENU",
                newName: "MENU_SORT");

            migrationBuilder.RenameColumn(
                name: "MenuPermissions",
                table: "SYS_MENU",
                newName: "MENU_PERMISSIONS");

            migrationBuilder.RenameColumn(
                name: "MenuPath",
                table: "SYS_MENU",
                newName: "MENU_PATH");

            migrationBuilder.RenameColumn(
                name: "MenuName",
                table: "SYS_MENU",
                newName: "MENU_NAME");

            migrationBuilder.RenameColumn(
                name: "ComponentPath",
                table: "SYS_MENU",
                newName: "COMPONENT_PATH");

            migrationBuilder.RenameColumn(
                name: "MenuId",
                table: "SYS_MENU",
                newName: "MENU_ID");

            migrationBuilder.AddColumn<bool>(
                name: "ENABLED",
                table: "SYS_USER",
                type: "bit",
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ENABLED",
                table: "SYS_USER");

            migrationBuilder.RenameColumn(
                name: "ENABLED",
                table: "SYS_MENU",
                newName: "Enabled");

            migrationBuilder.RenameColumn(
                name: "PARENT_MENU_ID",
                table: "SYS_MENU",
                newName: "ParentMenuId");

            migrationBuilder.RenameColumn(
                name: "OPEN_WAY",
                table: "SYS_MENU",
                newName: "OpenWay");

            migrationBuilder.RenameColumn(
                name: "MENU_TYPE",
                table: "SYS_MENU",
                newName: "MenuType");

            migrationBuilder.RenameColumn(
                name: "MENU_TITLE",
                table: "SYS_MENU",
                newName: "MenuTitle");

            migrationBuilder.RenameColumn(
                name: "MENU_SORT",
                table: "SYS_MENU",
                newName: "MenuSort");

            migrationBuilder.RenameColumn(
                name: "MENU_PERMISSIONS",
                table: "SYS_MENU",
                newName: "MenuPermissions");

            migrationBuilder.RenameColumn(
                name: "MENU_PATH",
                table: "SYS_MENU",
                newName: "MenuPath");

            migrationBuilder.RenameColumn(
                name: "MENU_NAME",
                table: "SYS_MENU",
                newName: "MenuName");

            migrationBuilder.RenameColumn(
                name: "COMPONENT_PATH",
                table: "SYS_MENU",
                newName: "ComponentPath");

            migrationBuilder.RenameColumn(
                name: "MENU_ID",
                table: "SYS_MENU",
                newName: "MenuId");
        }
    }
}
